<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
        xmlns:c="http://java.sun.com/jstl/core" 
        xmlns:p="http://primefaces.org/ui"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        
        >

    <ui:composition template="template.xhtml">
        <ui:define name="content">

<div id="body">
    <div class="panel">

        <h2>Confirm Order</h2>

        <h:messages layout="table" styleClass="error"/>

        <h:form>

            <div class="zoneEditor">
                <h3>Personal information</h3>

                <h:panelGrid columns="2">
                    <h:outputText value="Firstname :"/>
                    <h:inputText value="#{cart.customer.firstname}" readonly="true"/>

                    <h:outputText value="Lastname :"/>
                    <h:inputText value="#{cart.customer.lastname}" readonly="true"/>

                    <h:outputText value="Email :"/>
                    <h:inputText value="#{cart.customer.email}" readonly="true"/>

                </h:panelGrid>
            </div>

            <div class="zoneEditor">
                <h3>Delivery Address</h3>

                <h:panelGrid columns="2">
                    <h:outputText value="*Street1 :"/>
                    <h:inputText value="#{cart.deliveryAddress.street1}"/>

                    <h:outputText value="Street2 :"/>
                    <h:inputText value="#{cart.deliveryAddress.street2}"/>

                    <h:outputText value="*City :"/>
                    <h:inputText value="#{cart.deliveryAddress.city}"/>

                    <h:outputText value="State :"/>
                    <h:inputText value="#{cart.deliveryAddress.state}"/>

                    <h:outputText value="*Zipcode :"/>
                    <h:inputText value="#{cart.deliveryAddress.zipcode}"/>

                    <h:outputText value="*Country :"/>
                    <h:inputText value="#{cart.deliveryAddress.country}"/>

                </h:panelGrid>
            </div>

            <div class="zoneEditor">
                <h3>Credit Card</h3>

                <h:panelGrid columns="2">
                    <h:outputText value="*Credit card number :"/>
                    <h:inputText value="#{cart.creditCard.creditCardNumber}"/>

                    <h:outputText value="*Type :"/>
                    <h:selectOneMenu value="#{cart.creditCard.creditCardType}">
                        <f:selectItem itemValue="visa" itemLabel="Visa"/>
                        <f:selectItem itemValue="visa_gold" itemLabel="Visa Gold"/>
                        <f:selectItem itemValue="master" itemLabel="Master Card"/>
                        <f:selectItem itemValue="american" itemLabel="American Express"/>
                    </h:selectOneMenu>

                    <h:outputText value="*Expiry date (MM/YY):"/>
                    <h:inputText value="#{cart.creditCard.creditCardExpDate}"/>
                </h:panelGrid>
            </div>

            <div class="zoneButton">
                <h:commandButton value="Submit" action="#{cart.confirmOrder}" type="submit"/>
            </div>
        </h:form>

    </div>
</div>        
            
            

            
</ui:define>
	
        
    </ui:composition>
</html>